//
//  PGTextField.m
//  youqu
//
//  Created by 彭鹏 on 16/9/24.
//  Copyright © 2016年 pengpeng. All rights reserved.
//

#import "PGTextField.h"
#import "UITextField+PGExtend.h"
@implementation PGTextField


- (void)awakeFromNib {
    [super awakeFromNib];
//    NSString *placeholder = self.placeholder;
//    self.placeholder = @" ";
    self.textColor = [UIColor whiteColor];
    self.tintColor = [UIColor whiteColor];
//    self.placeholderColor = self.tintColor;
//    self.placeholder = placeholder;
    
    [self addTarget:self action:@selector(editingDidBegin:) forControlEvents:UIControlEventEditingDidBegin];
    
    [self addTarget:self action:@selector(editingDidEnd:) forControlEvents:UIControlEventEditingDidEnd];
    
}

- (void)editingDidBegin:(PGTextField *)textField {
    textField.placeholderColor = [UIColor whiteColor];
}

- (void)editingDidEnd:(PGTextField *)textField {
    textField.placeholderColor = rgba(0, 0, 0.0980392, 0.22);
}


@end
